package jisuanke;

import java.util.Scanner;

public class 跳跃游戏 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        for(int i=0;i<n;i++){
            a[i] = sc.nextInt();
        }
        function(a);
    }

    public static void function(int a[]){
        int n = a.length;
        int i=0,k=0;
        for(i=n-1;i>=0;i--){
            if(a[i] == 0){
                for(k=i-1;k>=0;k--){
                    if(a[k]>i-k){
                        i = k-1;
                        break;
                    }
                }
            }
            if(k == -1){
                System.out.println("false");
                return;
            }
        }
        System.out.println("true");
        return;
    }
}
